package com.example.foo.api.web.ftt;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.GetMapping;

import com.ruoyi.common.core.domain.AjaxResult;
import com.example.support.redis.RedisHelper;

@org.springframework.web.bind.annotation.RestController
public class FttAction {

	public FttAction() {
	}

	@GetMapping("/api/ftts/summary")
	public AjaxResult index() {
		String fttWeekProfitTotal = RedisHelper.get("FttWeekProfit:total");
		if (fttWeekProfitTotal == null) {
			fttWeekProfitTotal = "0.00";
		}

		Map<String, Object> resultMap = new HashMap<>();
		resultMap.put("fttWeekProfitTotal", fttWeekProfitTotal);

		return AjaxResult.successData(resultMap);
	}

}
